Inheritance diagram for I3DExSceneCommand:

Public Member Functions | |
| virtual void MCCOMAPI | GetMenuCallBack (ISelfPrepareMenuCallBack **callBack)=0 |
| virtual MCCOMErr MCCOMAPI | Init (ISceneDocument *sceneDocument)=0 |
| virtual MCCOMErr MCCOMAPI | Prepare ()=0 |
| virtual boolean MCCOMAPI | CanUndo ()=0 |
| virtual boolean MCCOMAPI | Do ()=0 |
| virtual boolean MCCOMAPI | Undo ()=0 |
| virtual boolean MCCOMAPI | Redo ()=0 |
| virtual boolean MCCOMAPI | PostPrepare ()=0 |
They work is a very similar manner as regular actions, with a Do(), Undo() and Redo() methods.
The 'scmd' resource
You MUST provide a 'scmd' resource to specify additionnal information:
Note : one instance of each type of Scene Command will be created at the application startup. This instance will be used only for menu enabling purposes by calling the SelfPrepareMenus() method. All other methods of these instances will NEVER be called, including Init(). Therefore, the I3DExSceneCommand::SelfPrepareMenus() proc should be completely self-sufficient.
|
|
Returns true if the Scene Command is undoable Implemented in TBasicSceneCommand. |
|
|
Do phase. Returns true if your actually changed something in the Scene Implemented in TBasicSceneCommand. |
|
|
Returns a callBack that is called to check if this scene command is enabled for a given document. Note that the returned object should never keep a reference to the scene document or anything in the scene since it will only be deleted when the application shutsdown
Implemented in TBasicSceneCommand. |
|
|
Init() is called after the Scene Command is instanciated. Use sceneDocument to get the selection or any other Scene data you would need to perform your action
Implemented in TBasicSceneCommand. |
|
|
PostPrepare is called after Prepare and the options dialog for the pmap so that you can create data caches needed for do/undo/redo operations
Implemented in TBasicSceneCommand. |
|
|
Prepare allows you to perform any preparation work needed (even posting a dialog). Make sure you return MC_S_OK if it is OK to proceed with the Scene Command. If your Scene Command has a PMap resource and the corresponding 'Node' UI resources, then the application will create a modal dialog for you just after Prepare(). Implemented in TBasicSceneCommand. |
|
|
Redo phase. Returns true if your actually changed something in the Scene Implemented in TBasicSceneCommand. |
|
|
Undo phase. Returns true if your actually changed something in the Scene Implemented in TBasicSceneCommand. |
1.4.5